using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using IGlobalist.Cms.Common;
using IGlobalist.Cms.Bll;
using IGlobalist.Cms.Model;
using System.Collections.Generic;

namespace IGlobalist.Cms.Admin.Control
{
    public partial class FAQsViewAnswer : AdminBaseUserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                GridViewBindData();
            }
        }

        private void GridViewBindData()
        {
            IList<IFAQ> answerlist = FAQController.GetFAQList();
            IList<IFAQ> list = new List<IFAQ>();
            foreach (IFAQ faq in answerlist)
            { 
                if(!string.IsNullOrEmpty(faq.Answer))
                    list.Add((IFAQ) faq);
            }
            gvFAQViews.DataSource = list;
            gvFAQViews.DataBind();
        
        }
    }
}